<?php
if(!check_manager_login()) exit('无权查看，请登录!');
require_once(MODEL_PATH.DS.'Brand.php');
$Brand = new Brand();

$bids = isset($_GET['bid'])?$_GET['bid']:'';
$arr_tmp = $Brand->getBrandImageByIds($bids);
if(isset($arr_tmp)){
	foreach($arr_tmp as $arr){
		$file_name = 'uploads/'.$arr['image'];
		if(file_exists($file_name)){
			@unlink($file_name);
		}
	}
}
$result = $Brand->delBrandByIds($bids);
if($result){
	redirect('index.php?mod=brand&act=list','删除成功！');
}else{
	redirect('index.php?mod=brand&act=list','删除失败！');
}
?>